3.160 \(\int \frac {(A+B \log (e (a+b x)^n (c+d x)^{-n}))^2}{(a+b x)^2} \, dx\)

Optimal. Leaf size=129 \[ -\frac {2 B n (c+d x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{(a+b x) (b c-a d)}-\frac {(c+d x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )^2}{(a+b x) (b c-a d)}-\frac {2 B^2 n^2 (c+d x)}{(a+b x) (b c-a d)} \]

[Out]

-2*B^2*n^2*(d*x+c)/(-a*d+b*c)/(b*x+a)-2*B*n*(d*x+c)*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))/(-a*d+b*c)/(b*x+a)-(d*x+
c)*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^2/(-a*d+b*c)/(b*x+a)

________________________________________________________________________________________

Rubi [A]  time = 0.18, antiderivative size = 189, normalized size of antiderivative = 1.47, number of steps used = 7, number of rules used = 3, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {6742, 2490, 32} \[ -\frac {A^2}{b (a+b x)}-\frac {2 A B (c+d x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (b c-a d)}-\frac {2 A B n}{b (a+b x)}-\frac {B^2 (c+d x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (b c-a d)}-\frac {2 B^2 n (c+d x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (b c-a d)}-\frac {2 B^2 n^2}{b (a+b x)} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^2/(a + b*x)^2,x]

[Out]

-(A^2/(b*(a + b*x))) - (2*A*B*n)/(b*(a + b*x)) - (2*B^2*n^2)/(b*(a + b*x)) - (2*A*B*(c + d*x)*Log[(e*(a + b*x)
^n)/(c + d*x)^n])/((b*c - a*d)*(a + b*x)) - (2*B^2*n*(c + d*x)*Log[(e*(a + b*x)^n)/(c + d*x)^n])/((b*c - a*d)*
(a + b*x)) - (B^2*(c + d*x)*Log[(e*(a + b*x)^n)/(c + d*x)^n]^2)/((b*c - a*d)*(a + b*x))

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2490

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)/((g_.) + (h_.)*(x_))^
2, x_Symbol] :> Simp[((a + b*x)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/((b*g - a*h)*(g + h*x)), x] - Dist[(p*
r*s*(b*c - a*d))/(b*g - a*h), Int[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1)/((c + d*x)*(g + h*x)), x], x] /
; FreeQ[{a, b, c, d, e, f, g, h, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && EqQ[p + q, 0] && NeQ[b*g - a*h, 0] &&
 IGtQ[s, 0]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(a+b x)^2} \, dx &=\int \left (\frac {A^2}{(a+b x)^2}+\frac {2 A B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2}+\frac {B^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2}\right ) \, dx\\ &=-\frac {A^2}{b (a+b x)}+(2 A B) \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx+B^2 \int \frac {\log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx\\ &=-\frac {A^2}{b (a+b x)}-\frac {2 A B (c+d x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(b c-a d) (a+b x)}-\frac {B^2 (c+d x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{(b c-a d) (a+b x)}+(2 A B n) \int \frac {1}{(a+b x)^2} \, dx+\left (2 B^2 n\right ) \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx\\ &=-\frac {A^2}{b (a+b x)}-\frac {2 A B n}{b (a+b x)}-\frac {2 A B (c+d x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(b c-a d) (a+b x)}-\frac {2 B^2 n (c+d x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(b c-a d) (a+b x)}-\frac {B^2 (c+d x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{(b c-a d) (a+b x)}+\left (2 B^2 n^2\right ) \int \frac {1}{(a+b x)^2} \, dx\\ &=-\frac {A^2}{b (a+b x)}-\frac {2 A B n}{b (a+b x)}-\frac {2 B^2 n^2}{b (a+b x)}-\frac {2 A B (c+d x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(b c-a d) (a+b x)}-\frac {2 B^2 n (c+d x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(b c-a d) (a+b x)}-\frac {B^2 (c+d x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{(b c-a d) (a+b x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.37, size = 236, normalized size = 1.83 \[ \frac {-(b c-a d) \left (2 B (A+B n) \log \left (e (a+b x)^n (c+d x)^{-n}\right )+B^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )+A^2+2 A B n+2 B^2 n^2\right )-2 B d n (a+b x) \log (a+b x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A+B n \log (c+d x)+B n\right )+2 B d n (a+b x) \log (c+d x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A+B n\right )+B^2 d n^2 (a+b x) \log ^2(c+d x)+B^2 d n^2 (a+b x) \log ^2(a+b x)}{b (a+b x) (b c-a d)} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^2/(a + b*x)^2,x]

[Out]

(B^2*d*n^2*(a + b*x)*Log[a + b*x]^2 + B^2*d*n^2*(a + b*x)*Log[c + d*x]^2 + 2*B*d*n*(a + b*x)*Log[c + d*x]*(A +
 B*n + B*Log[(e*(a + b*x)^n)/(c + d*x)^n]) - 2*B*d*n*(a + b*x)*Log[a + b*x]*(A + B*n + B*n*Log[c + d*x] + B*Lo
g[(e*(a + b*x)^n)/(c + d*x)^n]) - (b*c - a*d)*(A^2 + 2*A*B*n + 2*B^2*n^2 + 2*B*(A + B*n)*Log[(e*(a + b*x)^n)/(
c + d*x)^n] + B^2*Log[(e*(a + b*x)^n)/(c + d*x)^n]^2))/(b*(b*c - a*d)*(a + b*x))

________________________________________________________________________________________

fricas [B]  time = 0.84, size = 339, normalized size = 2.63 \[ -\frac {A^{2} b c - A^{2} a d + 2 \, {\left (B^{2} b c - B^{2} a d\right )} n^{2} + {\left (B^{2} b d n^{2} x + B^{2} b c n^{2}\right )} \log \left (b x + a\right )^{2} + {\left (B^{2} b d n^{2} x + B^{2} b c n^{2}\right )} \log \left (d x + c\right )^{2} + {\left (B^{2} b c - B^{2} a d\right )} \log \relax (e)^{2} + 2 \, {\left (A B b c - A B a d\right )} n + 2 \, {\left (B^{2} b c n^{2} + A B b c n + {\left (B^{2} b d n^{2} + A B b d n\right )} x + {\left (B^{2} b d n x + B^{2} b c n\right )} \log \relax (e)\right )} \log \left (b x + a\right ) - 2 \, {\left (B^{2} b c n^{2} + A B b c n + {\left (B^{2} b d n^{2} + A B b d n\right )} x + {\left (B^{2} b d n^{2} x + B^{2} b c n^{2}\right )} \log \left (b x + a\right ) + {\left (B^{2} b d n x + B^{2} b c n\right )} \log \relax (e)\right )} \log \left (d x + c\right ) + 2 \, {\left (A B b c - A B a d + {\left (B^{2} b c - B^{2} a d\right )} n\right )} \log \relax (e)}{a b^{2} c - a^{2} b d + {\left (b^{3} c - a b^{2} d\right )} x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^2/(b*x+a)^2,x, algorithm="fricas")

[Out]

-(A^2*b*c - A^2*a*d + 2*(B^2*b*c - B^2*a*d)*n^2 + (B^2*b*d*n^2*x + B^2*b*c*n^2)*log(b*x + a)^2 + (B^2*b*d*n^2*
x + B^2*b*c*n^2)*log(d*x + c)^2 + (B^2*b*c - B^2*a*d)*log(e)^2 + 2*(A*B*b*c - A*B*a*d)*n + 2*(B^2*b*c*n^2 + A*
B*b*c*n + (B^2*b*d*n^2 + A*B*b*d*n)*x + (B^2*b*d*n*x + B^2*b*c*n)*log(e))*log(b*x + a) - 2*(B^2*b*c*n^2 + A*B*
b*c*n + (B^2*b*d*n^2 + A*B*b*d*n)*x + (B^2*b*d*n^2*x + B^2*b*c*n^2)*log(b*x + a) + (B^2*b*d*n*x + B^2*b*c*n)*l
og(e))*log(d*x + c) + 2*(A*B*b*c - A*B*a*d + (B^2*b*c - B^2*a*d)*n)*log(e))/(a*b^2*c - a^2*b*d + (b^3*c - a*b^
2*d)*x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A\right )}^{2}}{{\left (b x + a\right )}^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^2/(b*x+a)^2,x, algorithm="giac")

[Out]

integrate((B*log((b*x + a)^n*e/(d*x + c)^n) + A)^2/(b*x + a)^2, x)

________________________________________________________________________________________

maple [C]  time = 2.25, size = 10098, normalized size = 78.28 \[ \text {output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^2/(b*x+a)^2,x)

[Out]

result too large to display

________________________________________________________________________________________

maxima [B]  time = 1.53, size = 449, normalized size = 3.48 \[ -B^{2} {\left (\frac {2 \, {\left (\frac {d e n \log \left (b x + a\right )}{b^{2} c - a b d} - \frac {d e n \log \left (d x + c\right )}{b^{2} c - a b d} + \frac {e n}{b^{2} x + a b}\right )} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )}{e} + \frac {2 \, b c e^{2} n^{2} - 2 \, a d e^{2} n^{2} - {\left (b d e^{2} n^{2} x + a d e^{2} n^{2}\right )} \log \left (b x + a\right )^{2} - {\left (b d e^{2} n^{2} x + a d e^{2} n^{2}\right )} \log \left (d x + c\right )^{2} + 2 \, {\left (b d e^{2} n^{2} x + a d e^{2} n^{2}\right )} \log \left (b x + a\right ) - 2 \, {\left (b d e^{2} n^{2} x + a d e^{2} n^{2} - {\left (b d e^{2} n^{2} x + a d e^{2} n^{2}\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )}{{\left (a b^{2} c - a^{2} b d + {\left (b^{3} c - a b^{2} d\right )} x\right )} e^{2}}\right )} - \frac {B^{2} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )^{2}}{b^{2} x + a b} - \frac {2 \, {\left (\frac {d e n \log \left (b x + a\right )}{b^{2} c - a b d} - \frac {d e n \log \left (d x + c\right )}{b^{2} c - a b d} + \frac {e n}{b^{2} x + a b}\right )} A B}{e} - \frac {2 \, A B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )}{b^{2} x + a b} - \frac {A^{2}}{b^{2} x + a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^2/(b*x+a)^2,x, algorithm="maxima")

[Out]

-B^2*(2*(d*e*n*log(b*x + a)/(b^2*c - a*b*d) - d*e*n*log(d*x + c)/(b^2*c - a*b*d) + e*n/(b^2*x + a*b))*log((b*x
 + a)^n*e/(d*x + c)^n)/e + (2*b*c*e^2*n^2 - 2*a*d*e^2*n^2 - (b*d*e^2*n^2*x + a*d*e^2*n^2)*log(b*x + a)^2 - (b*
d*e^2*n^2*x + a*d*e^2*n^2)*log(d*x + c)^2 + 2*(b*d*e^2*n^2*x + a*d*e^2*n^2)*log(b*x + a) - 2*(b*d*e^2*n^2*x +
a*d*e^2*n^2 - (b*d*e^2*n^2*x + a*d*e^2*n^2)*log(b*x + a))*log(d*x + c))/((a*b^2*c - a^2*b*d + (b^3*c - a*b^2*d
)*x)*e^2)) - B^2*log((b*x + a)^n*e/(d*x + c)^n)^2/(b^2*x + a*b) - 2*(d*e*n*log(b*x + a)/(b^2*c - a*b*d) - d*e*
n*log(d*x + c)/(b^2*c - a*b*d) + e*n/(b^2*x + a*b))*A*B/e - 2*A*B*log((b*x + a)^n*e/(d*x + c)^n)/(b^2*x + a*b)
 - A^2/(b^2*x + a*b)

________________________________________________________________________________________

mupad [B]  time = 5.27, size = 200, normalized size = 1.55 \[ -\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\,\left (\frac {2\,A\,B}{x\,b^2+a\,b}+\frac {2\,B^2\,n}{x\,b^2+a\,b}\right )-{\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}^2\,\left (\frac {B^2}{b\,\left (a+b\,x\right )}-\frac {B^2\,d}{b\,\left (a\,d-b\,c\right )}\right )-\frac {A^2+2\,A\,B\,n+2\,B^2\,n^2}{x\,b^2+a\,b}-\frac {B\,d\,n\,\mathrm {atan}\left (\frac {\left (\frac {c\,b^2+a\,d\,b}{b}+2\,b\,d\,x\right )\,1{}\mathrm {i}}{a\,d-b\,c}\right )\,\left (A+B\,n\right )\,4{}\mathrm {i}}{b\,\left (a\,d-b\,c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))^2/(a + b*x)^2,x)

[Out]

- log((e*(a + b*x)^n)/(c + d*x)^n)*((2*A*B)/(a*b + b^2*x) + (2*B^2*n)/(a*b + b^2*x)) - log((e*(a + b*x)^n)/(c
+ d*x)^n)^2*(B^2/(b*(a + b*x)) - (B^2*d)/(b*(a*d - b*c))) - (A^2 + 2*B^2*n^2 + 2*A*B*n)/(a*b + b^2*x) - (B*d*n
*atan((((b^2*c + a*b*d)/b + 2*b*d*x)*1i)/(a*d - b*c))*(A + B*n)*4i)/(b*(a*d - b*c))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*ln(e*(b*x+a)**n/((d*x+c)**n)))**2/(b*x+a)**2,x)

[Out]

Timed out

________________________________________________________________________________________